#ifndef TABLE_DRAWER_H
#define TABLE_DRAWER_H

#include <QOpenGLTexture>
#include "texture_shader_program.h"
#include "vertex_object.h"
#include "geometry/table.h"

class TableDrawer : public VertexObject {
    public:
        explicit TableDrawer(TextureShaderProgram *program, Table *table)
            :VertexObject(program), m_table(table) {
                init();
            }
        virtual ~TableDrawer();

    public:
        void draw(QMatrix4x4 &modelViewProjectM) override;

    private:
        void init();

    private:
        // 纹理图片
        QOpenGLTexture *m_texture = nullptr;
        Table * m_table = nullptr;
};
#endif // TABLE_DRAWER_H
